import React from 'react'
import ReactDOM from 'react-dom'
import { BrowserRouter, Route, Routes } from 'react-router-dom'
import routerConfig from './router/index'
import './assets/reset.less'

ReactDOM.render(
  <React.StrictMode>
    <BrowserRouter>
      <Routes>
        {
          routerConfig.routes.map((route) => {
            return (
              <Route 
                key={route.path} 
                path={route.path} 
                element={<route.component/>}
              />
            )
          })
        }
      </Routes>
    </BrowserRouter>
  </React.StrictMode>,
  document.getElementById('root')
)